#ifndef _NVS_H_
#define _NVS_H_

#include "includes.h"
#include "custom.h"

extern uint8_t g_MemSaveErr[2002];
extern int16_t g_MemSetSchedule[66];
extern lv_font_t lv_font_arial_14;
extern lv_font_t lv_font_arial_16;
extern lv_font_t lv_font_arial_20;

int nvs_start(void);
int nvs_read_data(const char *key, void *out_value, size_t *length);
int nvs_write_data(const char *key, const void *value, size_t length);
int nvs_events_clean(void);
void set_temp_limit(void);

void read_timing_nvs(void);
int write_timing_nvs(void);

char *fun_FindErrorString(uint16_t error_code);
void set_timing_default(void);

void write_new_firmware(uint8_t * data, uint32_t length);
#endif